/* 时间轴-精简样式 */
.timeline-simple {
    position: relative;

    .timeline-item {
        .item-info-box {
            overflow: hidden;
            width: 110px;
            float: left;
            position: relative;

            .item-icon {
                position: absolute;
                right: 0;
                top: 0;
                background-color: $timeline-simple-bg;
                border-color: $timeline-simple-border;
                border-style: solid;
                border-width: 1px 0px 1px 1px;
                padding: 2px 6px;

                .i {
                    font-size: 14px;
                }
            }

            .item-time {
                margin-top: 25px;
                text-align: right;
                padding: 10px;
            }
        }

        .item-content-box {
            .item-content {
                min-height: 110px;
                overflow: hidden;
                border-top: 1px solid $timeline-simple-border;
                border-left: 1px solid $timeline-simple-border;
                padding: 10px;

                &:hover {
                    background-color: $timeline-simple-bg;
                }
            }
        }
    }

    .timeline-item:first-child .item-content {
        border-top: none;
    }
}


.timeline-simple-center {
    position: relative;

    .timeline-item:nth-child(odd) {
        .item-info-box {
            overflow: hidden;
            width: 50%;
            float: left;
            position: relative;

            .item-icon {
                position: absolute;
                right: 0;
                top: 0;
                background-color: $timeline-simple-bg;
                border-color: $timeline-simple-border;
                border-style: solid;
                border-width: 1px 0px 1px 1px;
                padding: 2px 6px;

                .i {
                    font-size: 14px;
                }
            }

            .item-time {
                margin-top: 25px;
                text-align: right;
                padding: 10px;
            }
        }

        .item-content-box {
            .item-content {
                min-height: 110px;
                overflow: hidden;
                border-left: 1px solid $timeline-simple-border;
                padding: 10px;
                background-color: $timeline-simple-bg;
            }
        }
    }

    .timeline-item:nth-child(even) {
        .item-info-box {
            overflow: hidden;
            width: 50%;
            float: right;
            position: relative;

            .item-icon {
                position: absolute;
                left: 0;
                top: 0;
                background-color:$timeline-simple-bg; ;
                border-color: $timeline-simple-border;;
                border-style: solid;
                padding: 2px 6px;

                .i {
                    font-size: 14px;
                }
            }

            .item-time {
                margin-top: 25px;
                text-align: left;
                padding: 10px;
            }
        }

        .item-content-box {
            .item-content {
                min-height: 110px;
                overflow: hidden;
                background-color: $timeline-simple-bg;
                border-right: 1px solid $timeline-simple-border;
                padding: 10px;
            }
        }
    }

    .timeline-item:first-child .item-content {
        border-top: none;
    }
}

.timeline {
    position: relative;
    background-color: $timeline-bg;

    &::before {
        content: '';
        width: 4px;
        position: absolute;
        top: 0;
        left: 100px;
        height: 100%;
        background-color: $timeline-line-color;
        transform: translateX(-50%);
    }

    .timeline-item {
        margin-bottom: 20px;
        position: relative;

        .item-icon {
            width: 30px;
            height: 30px;
            position: absolute;
            border-radius: 50%;
            left: 100px;
            transform: translateX(-50%);
            top: 0;
            background-color: $timeline-icon-default-bg;
            color: $timeline-icon-default-color;
            display: flex;
            justify-content: center;
            align-items: center;

            i {
                font-size: 16px;
            }
            &.icon-primary {
                background-color:$timeline-icon-primary-bg;
                color: $timeline-icon-primary-color;
            }
            &.icon-success {
                background-color:$timeline-icon-success-bg;
                color: $timeline-icon-success-color;
            }
            &.icon-info {
                background-color:$timeline-icon-info-bg;
                color: $timeline-icon-info-color;
            }
            &.icon-warning {
                background-color:$timeline-icon-warning-bg;
                color: $timeline-icon-warning-color;
            }
            &.icon-danger {
                background-color:$timeline-icon-danger-bg;
                color: $timeline-icon-danger-color;
            }
        }

        .item-time {
            position: absolute;
            top: 0;
            line-height: 30px;
            text-align: right;
            width: 80px;
        }

        .item-content {
            position: relative;
            margin-left: 130px;
            background-color:$timeline-item-bg;
            padding: 10px;
            border-radius: 4px;
            border: 1px solid $timeline-item-border;

            &::before {
                content: "";
                position: absolute;
                top: 5px;
                right: 100%;
                height: 0;
                width: 0;
                border: 7px solid transparent;
                border-right: 7px solid $timeline-item-border;
            }

            &::after {
                content: '';
                display: table;
                clear: both;
            }
        }
    }
    &.timeline-center{
        &::before {
            left: 50%;
        }
        .timeline-item{
            .item-icon{
                left: 50%;
            }
            &::after {
                content: '';
                display: table;
                clear: both;
            }
        }
       
        .timeline-item:nth-child(odd) {
            .item-content{
                width: 45%;
                float: right;
            }
            .item-time{
                width: 45%;
            }
        }
        .timeline-item:nth-child(even) {
            .item-content{
                margin: 0;
                width: 45%;
                float: left;
                &::before {
                    content: "";
                    position: absolute;
                    top: 5px;
                    left: 100%;
                    height: 0;
                    width: 0;
                    border: 7px solid transparent;
                    border-left: 7px solid $timeline-item-border;
                }
            }
            .item-time{
                width: 45%;
                left: 50%;
                text-align: left;
                padding-left: 30px;
            }
        }
    }
}